package com.molichuxing.services.property;

/**
 * 专属商品类型：1：专属里程，2：订悦里程',
 *
 * @author xuelin yi
 */
public enum GoodsExclusiveTypeEnum {

    EXCLUSIVE(1, "茉莉征信"), ORDER_PLEASURE(2, "安鹏征信");

    int value;
    String name;

    GoodsExclusiveTypeEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    /**
     * 通过value获取枚举的name
     *
     * @param value
     * @return
     */
    public static GoodsExclusiveTypeEnum getName(int value) {
        for (GoodsExclusiveTypeEnum orderSource : GoodsExclusiveTypeEnum.values()) {
            if (orderSource.getValue() == value) {
                return orderSource;
            }
        }
        return null;
    }
}
